//
//  GeneralViewControler.m
//  Sofia
//
//  Created by Anton Chebotaev on 24/11/08.
//  Copyright 2008 IFMO. All rights reserved.
//

#import "SFGeneralViewController.h"



@implementation SFGeneralViewController
- (void)willBeDisplayed
{
	[testBool setState:[self loadTestBool]];	
}

- (IBAction)saveTestBool:(id)sender
{
	int newState = [testBool state];
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setBool:newState forKey:SFAOpenUntitled];
	NSLog(@"Test Bool value saved to %d. Writing to defaults", newState);	
}

- (BOOL)loadTestBool
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return [defaults boolForKey:SFAOpenUntitled];	
}

- (NSString *)title
{
	return NSLocalizedString(@"General", @"Title of 'General' preference pane");
}

- (NSString *)identifier
{
	return @"SFGeneralPane";
}

- (NSImage *)image
{
	return [NSImage imageNamed:@"NSPreferencesGeneral"];
}

@end
